package com.info.zhiduoduo.admin.controller;

import com.info.zhiduoduo.admin.model.formbean.maker.MakerBalanceFormBean;
import com.info.zhiduoduo.admin.service.ProjectBalanceService;
import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "创客可用额度查询")
@RequestMapping("/balance")
public class ProjectBalanceController {

    @Autowired
    ProjectBalanceService projectBalanceService;

    @PostMapping("/queryMakerAllProjectAmount")
    @ApiOperation("创客所有项目交易金额总数查询")
    public SmartResult queryMakerAllProjectAmount(@RequestBody BaseSimpleFormBean<MakerBalanceFormBean> formBean) {
        return projectBalanceService.queryMakerAllProjectAmount(formBean);
    }

    /**
     *  交易额度查询
     *
     * @return
     */
    @PostMapping("/queryBalanceMaker")
    @ApiOperation(" 额度查询")
    public SmartResult queryBalanceCompanyMaker(@RequestBody BaseSimpleFormBean<MakerBalanceFormBean> formBean) {
        return projectBalanceService.queryBalanceCompanyCompany(formBean);
    }

    /**
     *智众包额度查询
     *
     * @Author wang
     * @date 2021/4/1
     **/
    @PostMapping("/queryBalanceCrowdsoucre")
    @ApiOperation("智众包额度查询")
    public SmartResult queryBalanceCompanyCrowdsoucre(@RequestBody BaseSimpleFormBean<MakerBalanceFormBean> formBean) {
        return projectBalanceService.queryBalanceCrowdsoucre(formBean);
    }

    /**
     *节税侠额度查询
     *
     * @Author wang
     * @date 2021/4/1
     **/
    @PostMapping("/queryBalanceTaxerInvoice")
    @ApiOperation(" 额度查询")
    public SmartResult queryBalanceCompanyTaxerInvoice(@RequestBody BaseSimpleFormBean<MakerBalanceFormBean> formBean) {
        return projectBalanceService.queryBalanceTaxerInvoice(formBean);
    }

}
